inherited fOfLiberar: TfOfLiberar
  Width = 800
  Height = 640
  BorderIcons = [biSystemMenu, biMinimize, biMaximize]
  Caption = 'O.F. Liberar'
  OldCreateOrder = True
  WindowState = wsMaximized
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  inherited MMJPanel1: TMMJPanel
    Width = 784
    Height = 65
    object Label1: TLabel
      Left = 48
      Top = 8
      Width = 77
      Height = 13
      Caption = 'SITUACAO O.F.'
      Transparent = True
    end
    object lblCodigo: TJvLabel
      Left = 48
      Top = 40
      Width = 5
      Height = 13
      Caption = '.'
      Transparent = True
      HotTrackFont.Charset = DEFAULT_CHARSET
      HotTrackFont.Color = clWindowText
      HotTrackFont.Height = -11
      HotTrackFont.Name = 'MS Sans Serif'
      HotTrackFont.Style = []
    end
    object lblDescri: TJvLabel
      Left = 160
      Top = 40
      Width = 8
      Height = 13
      Caption = '..'
      Transparent = True
      HotTrackFont.Charset = DEFAULT_CHARSET
      HotTrackFont.Color = clWindowText
      HotTrackFont.Height = -11
      HotTrackFont.Name = 'MS Sans Serif'
      HotTrackFont.Style = []
    end
    object rgOf: TComboBox
      Left = 160
      Top = 8
      Width = 249
      Height = 21
      ItemHeight = 13
      TabOrder = 0
      Text = 'AGUARDANDO'
      OnChange = rgOfChange
      Items.Strings = (
        'AGUARDANDO'
        'LIBERADO'
        'ANDAMENTO'
        'TODAS')
    end
    object chkVerTodas: TCheckBox
      Left = 432
      Top = 10
      Width = 97
      Height = 17
      Caption = 'Ver Todas'
      TabOrder = 1
    end
  end
  inherited MMJPanel2: TMMJPanel
    Top = 525
    Width = 784
    Height = 77
    inherited btnGravar: TBitBtn
      Left = 307
      Anchors = [akTop, akRight]
      Caption = 'F5-Gravar'
      TabOrder = 0
    end
    inherited btnIncluir: TBitBtn
      Left = 87
      TabOrder = 3
      Visible = False
    end
    inherited btnCancelar: TBitBtn
      Left = 98
      Visible = False
    end
    inherited btnExcluir: TBitBtn
      Left = 74
      TabOrder = 4
      Visible = False
    end
    inherited btnProcurar: TBitBtn
      Left = 425
      Caption = 'F2-Imprimir'
      TabOrder = 1
      OnClick = btnProcurarClick
    end
    inherited btnSair: TBitBtn
      Left = 545
      Anchors = [akTop, akRight]
      TabOrder = 2
    end
  end
  object gridProd: TJvDBGrid [2]
    Left = 0
    Top = 65
    Width = 473
    Height = 460
    Align = alLeft
    DataSource = dsDetOf
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWhite
    Font.Height = -11
    Font.Name = 'MS Sans Serif'
    Font.Style = []
    Options = [dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]
    ParentFont = False
    TabOrder = 2
    TitleFont.Charset = DEFAULT_CHARSET
    TitleFont.Color = clWindowText
    TitleFont.Height = -11
    TitleFont.Name = 'MS Sans Serif'
    TitleFont.Style = []
    OnCellClick = gridProdCellClick
    OnDrawColumnCell = gridProdDrawColumnCell
    AlternateRowFontColor = clBlue
    AutoSizeColumns = True
    SelectColumnsDialogStrings.Caption = 'Select columns'
    SelectColumnsDialogStrings.OK = '&OK'
    SelectColumnsDialogStrings.NoSelectionWarning = 'At least one column must be visible!'
    EditControls = <>
    RowsHeight = 17
    TitleRowHeight = 17
    Columns = <
      item
        Expanded = False
        FieldName = 'DOF_CODIGO'
        Title.Caption = 'O.F. DET.'
        Width = 61
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'DOF_CODIOF'
        Title.Caption = 'O.F.'
        Width = 59
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'DOF_QTDPRG'
        Title.Caption = 'QTDE.'
        Width = 74
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'PRO_CODPRO'
        Title.Caption = 'CODIGO'
        Width = 98
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'PRO_DESCRI'
        Title.Caption = 'DESCRICAO'
        Width = 160
        Visible = True
      end>
  end
  object Panel1: TPanel [3]
    Left = 473
    Top = 65
    Width = 311
    Height = 460
    Align = alClient
    Caption = 'Panel1'
    TabOrder = 3
    object gridComp: TJvDBGrid
      Left = 1
      Top = 1
      Width = 309
      Height = 313
      Align = alClient
      DataSource = dsComp
      Options = [dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]
      TabOrder = 0
      TitleFont.Charset = DEFAULT_CHARSET
      TitleFont.Color = clWindowText
      TitleFont.Height = -11
      TitleFont.Name = 'MS Sans Serif'
      TitleFont.Style = []
      OnCellClick = gridCompCellClick
      OnDrawColumnCell = gridCompDrawColumnCell
      AlternateRowFontColor = clBlue
      AutoSizeColumns = True
      SelectColumnsDialogStrings.Caption = 'Select columns'
      SelectColumnsDialogStrings.OK = '&OK'
      SelectColumnsDialogStrings.NoSelectionWarning = 'At least one column must be visible!'
      EditControls = <>
      RowsHeight = 17
      TitleRowHeight = 17
      Columns = <
        item
          Expanded = False
          FieldName = 'OFC_COFDET'
          Title.Caption = 'O.F. DET.'
          Width = 33
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'OFC_CODPRO'
          Title.Caption = 'CODIGO'
          Width = 42
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'PRO_DESCRI'
          Title.Caption = 'PRODUTO'
          Width = 87
          Visible = True
        end
        item
          Expanded = False
          Title.Caption = 'Q. COMP.'
          Width = 31
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'OFC_QTDEMP'
          Title.Caption = 'Q.EMP.'
          Width = 31
          Visible = True
        end
        item
          Expanded = False
          Title.Caption = 'SALDO'
          Width = 33
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'OFC_QTREAL'
          Title.Caption = 'Q. REAL'
          Width = 29
          Visible = True
        end>
    end
    object Panel2: TPanel
      Left = 1
      Top = 314
      Width = 309
      Height = 145
      Align = alBottom
      TabOrder = 1
      object Label2: TLabel
        Left = 24
        Top = 24
        Width = 42
        Height = 13
        Caption = 'CODIGO'
      end
      object Label3: TLabel
        Left = 24
        Top = 64
        Width = 71
        Height = 13
        Caption = 'QUANTIDADE'
      end
      object lblProdDescri: TLabel
        Left = 216
        Top = 24
        Width = 3
        Height = 13
        Caption = '.'
      end
      object BitBtn6: TBitBtn
        Left = 183
        Top = 23
        Width = 31
        Height = 24
        Hint = 'Procurar'
        ParentShowHint = False
        PopupMenu = PopupMenu1
        ShowHint = True
        TabOrder = 0
        OnClick = BitBtn6Click
        Glyph.Data = {
          66010000424D6601000000000000760000002800000014000000140000000100
          040000000000F000000000000000000000001000000010000000000000000000
          BF0000BF000000BFBF00BF000000BF00BF00BFBF0000C0C0C000808080000000
          FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00777777777777
          7777777700000F087777777777777777000080F087777777777777770000780F
          0877000000777777000077800000878787007777000077780087788888780777
          0000777708777777777780770000777707777770777770770000777087777700
          0777780700007770877770807077770700007770877777707777770700007770
          8777777077777707000077708777707070777707000077708777770007777707
          0000777708FF77707777707700007777088FF787777780770000777770888777
          7778077700007777770088888800777700007777777700000077777700007777
          77777777777777770000}
      end
      object edCod: TEdit
        Left = 96
        Top = 24
        Width = 89
        Height = 21
        TabOrder = 1
      end
      object edQtde: TJvCalcEdit
        Left = 96
        Top = 64
        Width = 121
        Height = 21
        ReadOnly = True
        ShowButton = False
        TabOrder = 2
        DecimalPlacesAlwaysShown = False
      end
    end
  end
  inherited PopupMenu1: TPopupMenu
    inherited Incuir1: TMenuItem
      Caption = 'Imprimir'
      OnClick = btnProcurarClick
    end
    inherited Gravar1: TMenuItem
      ShortCut = 116
    end
  end
  object sqlComp: TSQLDataSet
    CommandText = 
      'select OFC_CODIGO, OFC_COFDET, OFC_CODPRO, OFC_QTDEMP, '#39'OFC_QTCO' +
      'MP'#39' OFC_QTCOMP, OFC_QTREAL, PRO_DESCRI , '#39'OFC_QTCOMP'#39' as SALDO f' +
      'rom ATS_OFCONS, F_PRODS, ATS_ESTOQUE'#13#10'     WHERE PRO_CODPRO = OF' +
      'C_CODPRO  AND OFC_CODPRO = CODPRO(+)'
    MaxBlobSize = -1
    Params = <>
    SQLConnection = dm.SQLConnection1
    Left = 360
    Top = 160
    object sqlCompOFC_CODIGO: TFMTBCDField
      FieldName = 'OFC_CODIGO'
      Required = True
      Precision = 32
      Size = 8
    end
    object sqlCompOFC_COFDET: TFMTBCDField
      FieldName = 'OFC_COFDET'
      Precision = 32
      Size = 8
    end
    object sqlCompOFC_CODPRO: TStringField
      FieldName = 'OFC_CODPRO'
      Required = True
      Size = 26
    end
    object sqlCompOFC_QTDEMP: TFMTBCDField
      FieldName = 'OFC_QTDEMP'
      Precision = 32
      Size = 8
    end
    object sqlCompOFC_QTREAL: TFMTBCDField
      FieldName = 'OFC_QTREAL'
      Precision = 32
      Size = 8
    end
    object sqlCompPRO_DESCRI: TStringField
      FieldName = 'PRO_DESCRI'
      Required = True
      Size = 100
    end
  end
  object dspComp: TDataSetProvider
    DataSet = sqlComp
    Options = [poAllowCommandText]
    Left = 392
    Top = 160
  end
  object cdsComp: TClientDataSet
    Aggregates = <>
    Params = <>
    ProviderName = 'dspComp'
    Left = 424
    Top = 160
    object cdsCompOFC_CODIGO: TFMTBCDField
      FieldName = 'OFC_CODIGO'
      Required = True
      Precision = 32
      Size = 8
    end
    object cdsCompOFC_COFDET: TFMTBCDField
      FieldName = 'OFC_COFDET'
      Precision = 32
      Size = 8
    end
    object cdsCompOFC_CODPRO: TStringField
      FieldName = 'OFC_CODPRO'
      Required = True
      Size = 26
    end
    object cdsCompOFC_QTDEMP: TFMTBCDField
      FieldName = 'OFC_QTDEMP'
      DisplayFormat = ',##0.0'
      EditFormat = ',##0.0'
      Precision = 32
      Size = 8
    end
    object cdsCompOFC_QTREAL: TFMTBCDField
      FieldName = 'OFC_QTREAL'
      DisplayFormat = ',##0.0'
      EditFormat = ',##0.0'
      Precision = 32
      Size = 8
    end
    object cdsCompPRO_DESCRI: TStringField
      FieldName = 'PRO_DESCRI'
      Required = True
      Size = 100
    end
  end
  object dsComp: TDataSource
    DataSet = cdsComp
    Left = 456
    Top = 160
  end
  object sqlDetOf: TSQLDataSet
    CommandText = 
      'select DOF.*,  PRO_CODPRO, PRO_DESCRI  , DECODE(SLD,NULL,0,1) '#13#10 +
      ' as SALDO '#13#10'FROM '#13#10'('#13#10'    SELECT OFC_COFDET COD,  (NVL(SALDO,0) ' +
      '- OFC_QTCOMP)  SLD'#13#10'    FROM ATS_OFCONS, ATS_ESTOQUE '#13#10'    WHERE' +
      ' OFC_CODPRO = CODPRO(+)'#13#10'    AND (NVL(SALDO,0) - OFC_QTCOMP) < 0' +
      #13#10'   ),'#13#10'ATS_DETOF DOF, ATS_OF, F_PRODS '#13#10'    WHERE DOF.DOF_CODI' +
      'OF = COF_CODIOF '#13#10'    AND PRO_CODPRO = COF_CODPRO'#13#10'    AND COD(+' +
      ') = DOF_CODIGO'#13#10
    MaxBlobSize = -1
    Params = <>
    SQLConnection = dm.SQLConnection1
    Left = 32
    Top = 144
    object sqlDetOfDOF_CODIGO: TFMTBCDField
      FieldName = 'DOF_CODIGO'
      Required = True
      Precision = 32
      Size = 8
    end
    object sqlDetOfDOF_CODIOF: TStringField
      FieldName = 'DOF_CODIOF'
      Required = True
      Size = 60
    end
    object sqlDetOfSALDO: TFMTBCDField
      FieldName = 'SALDO'
      Precision = 32
      Size = 8
    end
    object sqlDetOfDOF_QTDPRG: TFMTBCDField
      FieldName = 'DOF_QTDPRG'
      Precision = 32
      Size = 8
    end
    object sqlDetOfPRO_CODPRO: TStringField
      FieldName = 'PRO_CODPRO'
      Required = True
      Size = 26
    end
    object sqlDetOfPRO_DESCRI: TStringField
      FieldName = 'PRO_DESCRI'
      Required = True
      Size = 100
    end
  end
  object dspDetOf: TDataSetProvider
    DataSet = sqlDetOf
    Options = [poAllowCommandText]
    Left = 64
    Top = 144
  end
  object cdsDetOf: TClientDataSet
    Aggregates = <>
    Params = <>
    ProviderName = 'dspDetOf'
    Left = 96
    Top = 144
    object cdsDetOfDOF_CODIGO: TFMTBCDField
      FieldName = 'DOF_CODIGO'
      Required = True
      Precision = 32
      Size = 8
    end
    object cdsDetOfDOF_CODIOF: TStringField
      FieldName = 'DOF_CODIOF'
      Required = True
      Size = 60
    end
    object cdsDetOfSALDO: TFMTBCDField
      FieldName = 'SALDO'
      Precision = 32
      Size = 8
    end
    object cdsDetOfDOF_QTDPRG: TFMTBCDField
      FieldName = 'DOF_QTDPRG'
      Precision = 32
      Size = 8
    end
    object cdsDetOfPRO_CODPRO: TStringField
      FieldName = 'PRO_CODPRO'
      Required = True
      Size = 26
    end
    object cdsDetOfPRO_DESCRI: TStringField
      FieldName = 'PRO_DESCRI'
      Required = True
      Size = 100
    end
  end
  object dsDetOf: TDataSource
    DataSet = cdsDetOf
    Left = 128
    Top = 144
  end
  object sds: TSQLDataSet
    MaxBlobSize = -1
    Params = <>
    SQLConnection = dm.SQLConnection1
    Left = 472
    Top = 8
  end
end
